cmake_minimum_required(VERSION 3.22)

project(protobuf_test)

FIND_PACKAGE(GTest REQUIRED)
if (GTest_FOUND)
	MESSAGE("gtest found")
endif (GTest_FOUND)

FIND_PACKAGE(absl REQUIRED)
if (absl_FOUND)
	MESSAGE("absl found")
endif (absl_FOUND)

FIND_PACKAGE(protobuf REQUIRED)
if (protobuf_FOUND)
	MESSAGE("Succeed")
endif (protobuf_FOUND)

FIND_PACKAGE(utf8_range REQUIRED)
set(UTF8RANGE_LIBRARY utf8_range::utf8_validity utf8_range::utf8_range)

set(ABSEL_LIBRARY absl::absl_check absl::absl_log absl::algorithm absl::base absl::bind_front absl::bits absl::btree absl::cleanup absl::cord absl::core_headers absl::debugging absl::die_if_null absl::dynamic_annotations absl::flags absl::flat_hash_map absl::flat_hash_set absl::function_ref absl::hash absl::layout absl::log_initialize absl::log_severity absl::memory absl::node_hash_map absl::node_hash_set absl::optional absl::span absl::status absl::statusor absl::strings absl::synchronization absl::time absl::type_traits absl::utility absl::variant)

ADD_EXECUTABLE(main main.cpp Fmk.pb.cc)
TARGET_LINK_LIBRARIES(main protobuf utf8_range ${UTF8RANGE_LIBRARY} ${ABSEL_LIBRARY})
